<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #current{
            background-color: #000;
            color: #f00;
            font-size: 100px;
            font-weight: 100px;
        }
    </style>
</head>
<body>
    弹窗倒计时:<span id="current">1000</span>
    <script>
        var currentObj=document.getElementById("current");
        var currentNum=currentObj.innerText;
        var timer=setInterval(()=>{
            currentNum-=1;
            currentObj.innerText=currentNum;
            if(currentNum==0){
                clearInterval(timer);
                open("https://www.baidu.com","baidu","heigth=800px,width=1200px,left=200px,top=100px",false);
            }
        },12);
    </script>
</body>
</html>